/*
 *  $Id: Scene.cs 1193 2010-11-14 13:59:43Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008-2009 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Events {
    /// <summary>
    /// Абстрактное событие, переводящее сцену в определенный тип.
    /// </summary>
    public abstract class SceneEvent<T> : AbstractEvent where T: OldScene {
        public override void Execute(OldScene scene) {
            if (scene is T)
                ExecuteInner((T) scene);
        }

        protected abstract void ExecuteInner(T scene);
    }

    /// <summary>
    /// Абстрактное событие для сцены DirectConnect.
    /// </summary>
    public abstract class DirectConnectEvent : SceneEvent<DirectConnectScene> {}

    /// <summary>
    /// Абстрактное событие для сцены Game.
    /// </summary>
    public abstract class GameEvent : SceneEvent<Game> {}
}
